import 'package:tin_flutter/generated/json/base/json_convert_content.dart';
import 'package:tin_flutter/ui/bean/response/home_content_entity.dart';

HomeContentEntity $HomeContentEntityFromJson(Map<String, dynamic> json) {
  final HomeContentEntity homeContentEntity = HomeContentEntity();
  final List<HomeContentAdvertiseList>? advertiseList = (json['advertiseList'] as List<dynamic>?)
      ?.map(
          (e) => jsonConvert.convert<HomeContentAdvertiseList>(e) as HomeContentAdvertiseList)
      .toList();
  if (advertiseList != null) {
    homeContentEntity.advertiseList = advertiseList;
  }
  final List<HomeContentBrandList>? brandList = (json['brandList'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<HomeContentBrandList>(e) as HomeContentBrandList).toList();
  if (brandList != null) {
    homeContentEntity.brandList = brandList;
  }
  final HomeContentHomeFlashPromotion? homeFlashPromotion = jsonConvert.convert<
      HomeContentHomeFlashPromotion>(json['homeFlashPromotion']);
  if (homeFlashPromotion != null) {
    homeContentEntity.homeFlashPromotion = homeFlashPromotion;
  }
  final List<HomeContentNewProductList>? newProductList = (json['newProductList'] as List<dynamic>?)
      ?.map(
          (e) => jsonConvert.convert<HomeContentNewProductList>(e) as HomeContentNewProductList)
      .toList();
  if (newProductList != null) {
    homeContentEntity.newProductList = newProductList;
  }
  final List<HomeContentHotProductList>? hotProductList = (json['hotProductList'] as List<dynamic>?)
      ?.map(
          (e) => jsonConvert.convert<HomeContentHotProductList>(e) as HomeContentHotProductList)
      .toList();
  if (hotProductList != null) {
    homeContentEntity.hotProductList = hotProductList;
  }
  final List<dynamic>? subjectList = (json['subjectList'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (subjectList != null) {
    homeContentEntity.subjectList = subjectList;
  }
  return homeContentEntity;
}

Map<String, dynamic> $HomeContentEntityToJson(HomeContentEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['advertiseList'] = entity.advertiseList.map((v) => v.toJson()).toList();
  data['brandList'] = entity.brandList.map((v) => v.toJson()).toList();
  data['homeFlashPromotion'] = entity.homeFlashPromotion.toJson();
  data['newProductList'] = entity.newProductList.map((v) => v.toJson()).toList();
  data['hotProductList'] = entity.hotProductList.map((v) => v.toJson()).toList();
  data['subjectList'] = entity.subjectList;
  return data;
}

extension HomeContentEntityExtension on HomeContentEntity {
  HomeContentEntity copyWith({
    List<HomeContentAdvertiseList>? advertiseList,
    List<HomeContentBrandList>? brandList,
    HomeContentHomeFlashPromotion? homeFlashPromotion,
    List<HomeContentNewProductList>? newProductList,
    List<HomeContentHotProductList>? hotProductList,
    List<dynamic>? subjectList,
  }) {
    return HomeContentEntity()
      ..advertiseList = advertiseList ?? this.advertiseList
      ..brandList = brandList ?? this.brandList
      ..homeFlashPromotion = homeFlashPromotion ?? this.homeFlashPromotion
      ..newProductList = newProductList ?? this.newProductList
      ..hotProductList = hotProductList ?? this.hotProductList
      ..subjectList = subjectList ?? this.subjectList;
  }
}

HomeContentAdvertiseList $HomeContentAdvertiseListFromJson(Map<String, dynamic> json) {
  final HomeContentAdvertiseList homeContentAdvertiseList = HomeContentAdvertiseList();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    homeContentAdvertiseList.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    homeContentAdvertiseList.name = name;
  }
  final int? type = jsonConvert.convert<int>(json['type']);
  if (type != null) {
    homeContentAdvertiseList.type = type;
  }
  final String? pic = jsonConvert.convert<String>(json['pic']);
  if (pic != null) {
    homeContentAdvertiseList.pic = pic;
  }
  final String? startTime = jsonConvert.convert<String>(json['startTime']);
  if (startTime != null) {
    homeContentAdvertiseList.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    homeContentAdvertiseList.endTime = endTime;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    homeContentAdvertiseList.status = status;
  }
  final int? clickCount = jsonConvert.convert<int>(json['clickCount']);
  if (clickCount != null) {
    homeContentAdvertiseList.clickCount = clickCount;
  }
  final int? orderCount = jsonConvert.convert<int>(json['orderCount']);
  if (orderCount != null) {
    homeContentAdvertiseList.orderCount = orderCount;
  }
  final String? url = jsonConvert.convert<String>(json['url']);
  if (url != null) {
    homeContentAdvertiseList.url = url;
  }
  final int? sort = jsonConvert.convert<int>(json['sort']);
  if (sort != null) {
    homeContentAdvertiseList.sort = sort;
  }
  return homeContentAdvertiseList;
}

Map<String, dynamic> $HomeContentAdvertiseListToJson(HomeContentAdvertiseList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['type'] = entity.type;
  data['pic'] = entity.pic;
  data['startTime'] = entity.startTime;
  data['endTime'] = entity.endTime;
  data['status'] = entity.status;
  data['clickCount'] = entity.clickCount;
  data['orderCount'] = entity.orderCount;
  data['url'] = entity.url;
  data['sort'] = entity.sort;
  return data;
}

extension HomeContentAdvertiseListExtension on HomeContentAdvertiseList {
  HomeContentAdvertiseList copyWith({
    int? id,
    String? name,
    int? type,
    String? pic,
    String? startTime,
    String? endTime,
    int? status,
    int? clickCount,
    int? orderCount,
    String? url,
    int? sort,
  }) {
    return HomeContentAdvertiseList()
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..type = type ?? this.type
      ..pic = pic ?? this.pic
      ..startTime = startTime ?? this.startTime
      ..endTime = endTime ?? this.endTime
      ..status = status ?? this.status
      ..clickCount = clickCount ?? this.clickCount
      ..orderCount = orderCount ?? this.orderCount
      ..url = url ?? this.url
      ..sort = sort ?? this.sort;
  }
}

HomeContentBrandList $HomeContentBrandListFromJson(Map<String, dynamic> json) {
  final HomeContentBrandList homeContentBrandList = HomeContentBrandList();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    homeContentBrandList.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    homeContentBrandList.name = name;
  }
  final String? firstLetter = jsonConvert.convert<String>(json['firstLetter']);
  if (firstLetter != null) {
    homeContentBrandList.firstLetter = firstLetter;
  }
  final int? sort = jsonConvert.convert<int>(json['sort']);
  if (sort != null) {
    homeContentBrandList.sort = sort;
  }
  final int? factoryStatus = jsonConvert.convert<int>(json['factoryStatus']);
  if (factoryStatus != null) {
    homeContentBrandList.factoryStatus = factoryStatus;
  }
  final int? showStatus = jsonConvert.convert<int>(json['showStatus']);
  if (showStatus != null) {
    homeContentBrandList.showStatus = showStatus;
  }
  final int? productCount = jsonConvert.convert<int>(json['productCount']);
  if (productCount != null) {
    homeContentBrandList.productCount = productCount;
  }
  final int? productCommentCount = jsonConvert.convert<int>(json['productCommentCount']);
  if (productCommentCount != null) {
    homeContentBrandList.productCommentCount = productCommentCount;
  }
  final String? logo = jsonConvert.convert<String>(json['logo']);
  if (logo != null) {
    homeContentBrandList.logo = logo;
  }
  final String? bigPic = jsonConvert.convert<String>(json['bigPic']);
  if (bigPic != null) {
    homeContentBrandList.bigPic = bigPic;
  }
  final String? brandStory = jsonConvert.convert<String>(json['brandStory']);
  if (brandStory != null) {
    homeContentBrandList.brandStory = brandStory;
  }
  return homeContentBrandList;
}

Map<String, dynamic> $HomeContentBrandListToJson(HomeContentBrandList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['firstLetter'] = entity.firstLetter;
  data['sort'] = entity.sort;
  data['factoryStatus'] = entity.factoryStatus;
  data['showStatus'] = entity.showStatus;
  data['productCount'] = entity.productCount;
  data['productCommentCount'] = entity.productCommentCount;
  data['logo'] = entity.logo;
  data['bigPic'] = entity.bigPic;
  data['brandStory'] = entity.brandStory;
  return data;
}

extension HomeContentBrandListExtension on HomeContentBrandList {
  HomeContentBrandList copyWith({
    int? id,
    String? name,
    String? firstLetter,
    int? sort,
    int? factoryStatus,
    int? showStatus,
    int? productCount,
    int? productCommentCount,
    String? logo,
    String? bigPic,
    String? brandStory,
  }) {
    return HomeContentBrandList()
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..firstLetter = firstLetter ?? this.firstLetter
      ..sort = sort ?? this.sort
      ..factoryStatus = factoryStatus ?? this.factoryStatus
      ..showStatus = showStatus ?? this.showStatus
      ..productCount = productCount ?? this.productCount
      ..productCommentCount = productCommentCount ?? this.productCommentCount
      ..logo = logo ?? this.logo
      ..bigPic = bigPic ?? this.bigPic
      ..brandStory = brandStory ?? this.brandStory;
  }
}

HomeContentHomeFlashPromotion $HomeContentHomeFlashPromotionFromJson(Map<String, dynamic> json) {
  final HomeContentHomeFlashPromotion homeContentHomeFlashPromotion = HomeContentHomeFlashPromotion();
  final String? startTime = jsonConvert.convert<String>(json['startTime']);
  if (startTime != null) {
    homeContentHomeFlashPromotion.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    homeContentHomeFlashPromotion.endTime = endTime;
  }
  final String? nextStartTime = jsonConvert.convert<String>(json['nextStartTime']);
  if (nextStartTime != null) {
    homeContentHomeFlashPromotion.nextStartTime = nextStartTime;
  }
  final String? nextEndTime = jsonConvert.convert<String>(json['nextEndTime']);
  if (nextEndTime != null) {
    homeContentHomeFlashPromotion.nextEndTime = nextEndTime;
  }
  final List<HomeContentHomeFlashPromotionProductList>? productList = (json['productList'] as List<
      dynamic>?)?.map(
          (e) =>
      jsonConvert.convert<HomeContentHomeFlashPromotionProductList>(
          e) as HomeContentHomeFlashPromotionProductList).toList();
  if (productList != null) {
    homeContentHomeFlashPromotion.productList = productList;
  }
  return homeContentHomeFlashPromotion;
}

Map<String, dynamic> $HomeContentHomeFlashPromotionToJson(HomeContentHomeFlashPromotion entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['startTime'] = entity.startTime;
  data['endTime'] = entity.endTime;
  data['nextStartTime'] = entity.nextStartTime;
  data['nextEndTime'] = entity.nextEndTime;
  data['productList'] = entity.productList.map((v) => v.toJson()).toList();
  return data;
}

extension HomeContentHomeFlashPromotionExtension on HomeContentHomeFlashPromotion {
  HomeContentHomeFlashPromotion copyWith({
    String? startTime,
    String? endTime,
    String? nextStartTime,
    String? nextEndTime,
    List<HomeContentHomeFlashPromotionProductList>? productList,
  }) {
    return HomeContentHomeFlashPromotion()
      ..startTime = startTime ?? this.startTime
      ..endTime = endTime ?? this.endTime
      ..nextStartTime = nextStartTime ?? this.nextStartTime
      ..nextEndTime = nextEndTime ?? this.nextEndTime
      ..productList = productList ?? this.productList;
  }
}

HomeContentHomeFlashPromotionProductList $HomeContentHomeFlashPromotionProductListFromJson(
    Map<String, dynamic> json) {
  final HomeContentHomeFlashPromotionProductList homeContentHomeFlashPromotionProductList = HomeContentHomeFlashPromotionProductList();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    homeContentHomeFlashPromotionProductList.id = id;
  }
  final int? brandId = jsonConvert.convert<int>(json['brandId']);
  if (brandId != null) {
    homeContentHomeFlashPromotionProductList.brandId = brandId;
  }
  final int? productCategoryId = jsonConvert.convert<int>(json['productCategoryId']);
  if (productCategoryId != null) {
    homeContentHomeFlashPromotionProductList.productCategoryId = productCategoryId;
  }
  final int? feightTemplateId = jsonConvert.convert<int>(json['feightTemplateId']);
  if (feightTemplateId != null) {
    homeContentHomeFlashPromotionProductList.feightTemplateId = feightTemplateId;
  }
  final int? productAttributeCategoryId = jsonConvert.convert<int>(
      json['productAttributeCategoryId']);
  if (productAttributeCategoryId != null) {
    homeContentHomeFlashPromotionProductList.productAttributeCategoryId =
        productAttributeCategoryId;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    homeContentHomeFlashPromotionProductList.name = name;
  }
  final String? pic = jsonConvert.convert<String>(json['pic']);
  if (pic != null) {
    homeContentHomeFlashPromotionProductList.pic = pic;
  }
  final String? productSn = jsonConvert.convert<String>(json['productSn']);
  if (productSn != null) {
    homeContentHomeFlashPromotionProductList.productSn = productSn;
  }
  final int? deleteStatus = jsonConvert.convert<int>(json['deleteStatus']);
  if (deleteStatus != null) {
    homeContentHomeFlashPromotionProductList.deleteStatus = deleteStatus;
  }
  final int? publishStatus = jsonConvert.convert<int>(json['publishStatus']);
  if (publishStatus != null) {
    homeContentHomeFlashPromotionProductList.publishStatus = publishStatus;
  }
  final int? newStatus = jsonConvert.convert<int>(json['newStatus']);
  if (newStatus != null) {
    homeContentHomeFlashPromotionProductList.newStatus = newStatus;
  }
  final int? recommandStatus = jsonConvert.convert<int>(json['recommandStatus']);
  if (recommandStatus != null) {
    homeContentHomeFlashPromotionProductList.recommandStatus = recommandStatus;
  }
  final int? verifyStatus = jsonConvert.convert<int>(json['verifyStatus']);
  if (verifyStatus != null) {
    homeContentHomeFlashPromotionProductList.verifyStatus = verifyStatus;
  }
  final int? sort = jsonConvert.convert<int>(json['sort']);
  if (sort != null) {
    homeContentHomeFlashPromotionProductList.sort = sort;
  }
  final int? sale = jsonConvert.convert<int>(json['sale']);
  if (sale != null) {
    homeContentHomeFlashPromotionProductList.sale = sale;
  }
  final double? price = jsonConvert.convert<double>(json['price']);
  if (price != null) {
    homeContentHomeFlashPromotionProductList.price = price;
  }
  final int? giftGrowth = jsonConvert.convert<int>(json['giftGrowth']);
  if (giftGrowth != null) {
    homeContentHomeFlashPromotionProductList.giftGrowth = giftGrowth;
  }
  final int? giftPoint = jsonConvert.convert<int>(json['giftPoint']);
  if (giftPoint != null) {
    homeContentHomeFlashPromotionProductList.giftPoint = giftPoint;
  }
  final int? usePointLimit = jsonConvert.convert<int>(json['usePointLimit']);
  if (usePointLimit != null) {
    homeContentHomeFlashPromotionProductList.usePointLimit = usePointLimit;
  }
  final String? subTitle = jsonConvert.convert<String>(json['subTitle']);
  if (subTitle != null) {
    homeContentHomeFlashPromotionProductList.subTitle = subTitle;
  }
  final double? originalPrice = jsonConvert.convert<double>(json['originalPrice']);
  if (originalPrice != null) {
    homeContentHomeFlashPromotionProductList.originalPrice = originalPrice;
  }
  final int? stock = jsonConvert.convert<int>(json['stock']);
  if (stock != null) {
    homeContentHomeFlashPromotionProductList.stock = stock;
  }
  final int? lowStock = jsonConvert.convert<int>(json['lowStock']);
  if (lowStock != null) {
    homeContentHomeFlashPromotionProductList.lowStock = lowStock;
  }
  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    homeContentHomeFlashPromotionProductList.unit = unit;
  }
  final double? weight = jsonConvert.convert<double>(json['weight']);
  if (weight != null) {
    homeContentHomeFlashPromotionProductList.weight = weight;
  }
  final int? previewStatus = jsonConvert.convert<int>(json['previewStatus']);
  if (previewStatus != null) {
    homeContentHomeFlashPromotionProductList.previewStatus = previewStatus;
  }
  final String? serviceIds = jsonConvert.convert<String>(json['serviceIds']);
  if (serviceIds != null) {
    homeContentHomeFlashPromotionProductList.serviceIds = serviceIds;
  }
  final String? keywords = jsonConvert.convert<String>(json['keywords']);
  if (keywords != null) {
    homeContentHomeFlashPromotionProductList.keywords = keywords;
  }
  final String? note = jsonConvert.convert<String>(json['note']);
  if (note != null) {
    homeContentHomeFlashPromotionProductList.note = note;
  }
  final String? albumPics = jsonConvert.convert<String>(json['albumPics']);
  if (albumPics != null) {
    homeContentHomeFlashPromotionProductList.albumPics = albumPics;
  }
  final String? detailTitle = jsonConvert.convert<String>(json['detailTitle']);
  if (detailTitle != null) {
    homeContentHomeFlashPromotionProductList.detailTitle = detailTitle;
  }
  final int? promotionPerLimit = jsonConvert.convert<int>(json['promotionPerLimit']);
  if (promotionPerLimit != null) {
    homeContentHomeFlashPromotionProductList.promotionPerLimit = promotionPerLimit;
  }
  final int? promotionType = jsonConvert.convert<int>(json['promotionType']);
  if (promotionType != null) {
    homeContentHomeFlashPromotionProductList.promotionType = promotionType;
  }
  final String? brandName = jsonConvert.convert<String>(json['brandName']);
  if (brandName != null) {
    homeContentHomeFlashPromotionProductList.brandName = brandName;
  }
  final String? productCategoryName = jsonConvert.convert<String>(json['productCategoryName']);
  if (productCategoryName != null) {
    homeContentHomeFlashPromotionProductList.productCategoryName = productCategoryName;
  }
  final String? description = jsonConvert.convert<String>(json['description']);
  if (description != null) {
    homeContentHomeFlashPromotionProductList.description = description;
  }
  final double? promotionPrice = jsonConvert.convert<double>(json['promotionPrice']);
  if (promotionPrice != null) {
    homeContentHomeFlashPromotionProductList.promotionPrice = promotionPrice;
  }
  final String? promotionStartTime = jsonConvert.convert<String>(json['promotionStartTime']);
  if (promotionStartTime != null) {
    homeContentHomeFlashPromotionProductList.promotionStartTime = promotionStartTime;
  }
  final String? promotionEndTime = jsonConvert.convert<String>(json['promotionEndTime']);
  if (promotionEndTime != null) {
    homeContentHomeFlashPromotionProductList.promotionEndTime = promotionEndTime;
  }
  return homeContentHomeFlashPromotionProductList;
}

Map<String, dynamic> $HomeContentHomeFlashPromotionProductListToJson(
    HomeContentHomeFlashPromotionProductList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['brandId'] = entity.brandId;
  data['productCategoryId'] = entity.productCategoryId;
  data['feightTemplateId'] = entity.feightTemplateId;
  data['productAttributeCategoryId'] = entity.productAttributeCategoryId;
  data['name'] = entity.name;
  data['pic'] = entity.pic;
  data['productSn'] = entity.productSn;
  data['deleteStatus'] = entity.deleteStatus;
  data['publishStatus'] = entity.publishStatus;
  data['newStatus'] = entity.newStatus;
  data['recommandStatus'] = entity.recommandStatus;
  data['verifyStatus'] = entity.verifyStatus;
  data['sort'] = entity.sort;
  data['sale'] = entity.sale;
  data['price'] = entity.price;
  data['giftGrowth'] = entity.giftGrowth;
  data['giftPoint'] = entity.giftPoint;
  data['usePointLimit'] = entity.usePointLimit;
  data['subTitle'] = entity.subTitle;
  data['originalPrice'] = entity.originalPrice;
  data['stock'] = entity.stock;
  data['lowStock'] = entity.lowStock;
  data['unit'] = entity.unit;
  data['weight'] = entity.weight;
  data['previewStatus'] = entity.previewStatus;
  data['serviceIds'] = entity.serviceIds;
  data['keywords'] = entity.keywords;
  data['note'] = entity.note;
  data['albumPics'] = entity.albumPics;
  data['detailTitle'] = entity.detailTitle;
  data['promotionPerLimit'] = entity.promotionPerLimit;
  data['promotionType'] = entity.promotionType;
  data['brandName'] = entity.brandName;
  data['productCategoryName'] = entity.productCategoryName;
  data['description'] = entity.description;
  data['promotionPrice'] = entity.promotionPrice;
  data['promotionStartTime'] = entity.promotionStartTime;
  data['promotionEndTime'] = entity.promotionEndTime;
  return data;
}

extension HomeContentHomeFlashPromotionProductListExtension on HomeContentHomeFlashPromotionProductList {
  HomeContentHomeFlashPromotionProductList copyWith({
    int? id,
    int? brandId,
    int? productCategoryId,
    int? feightTemplateId,
    int? productAttributeCategoryId,
    String? name,
    String? pic,
    String? productSn,
    int? deleteStatus,
    int? publishStatus,
    int? newStatus,
    int? recommandStatus,
    int? verifyStatus,
    int? sort,
    int? sale,
    double? price,
    int? giftGrowth,
    int? giftPoint,
    int? usePointLimit,
    String? subTitle,
    double? originalPrice,
    int? stock,
    int? lowStock,
    String? unit,
    double? weight,
    int? previewStatus,
    String? serviceIds,
    String? keywords,
    String? note,
    String? albumPics,
    String? detailTitle,
    int? promotionPerLimit,
    int? promotionType,
    String? brandName,
    String? productCategoryName,
    String? description,
    double? promotionPrice,
    String? promotionStartTime,
    String? promotionEndTime,
  }) {
    return HomeContentHomeFlashPromotionProductList()
      ..id = id ?? this.id
      ..brandId = brandId ?? this.brandId
      ..productCategoryId = productCategoryId ?? this.productCategoryId
      ..feightTemplateId = feightTemplateId ?? this.feightTemplateId
      ..productAttributeCategoryId = productAttributeCategoryId ?? this.productAttributeCategoryId
      ..name = name ?? this.name
      ..pic = pic ?? this.pic
      ..productSn = productSn ?? this.productSn
      ..deleteStatus = deleteStatus ?? this.deleteStatus
      ..publishStatus = publishStatus ?? this.publishStatus
      ..newStatus = newStatus ?? this.newStatus
      ..recommandStatus = recommandStatus ?? this.recommandStatus
      ..verifyStatus = verifyStatus ?? this.verifyStatus
      ..sort = sort ?? this.sort
      ..sale = sale ?? this.sale
      ..price = price ?? this.price
      ..giftGrowth = giftGrowth ?? this.giftGrowth
      ..giftPoint = giftPoint ?? this.giftPoint
      ..usePointLimit = usePointLimit ?? this.usePointLimit
      ..subTitle = subTitle ?? this.subTitle
      ..originalPrice = originalPrice ?? this.originalPrice
      ..stock = stock ?? this.stock
      ..lowStock = lowStock ?? this.lowStock
      ..unit = unit ?? this.unit
      ..weight = weight ?? this.weight
      ..previewStatus = previewStatus ?? this.previewStatus
      ..serviceIds = serviceIds ?? this.serviceIds
      ..keywords = keywords ?? this.keywords
      ..note = note ?? this.note
      ..albumPics = albumPics ?? this.albumPics
      ..detailTitle = detailTitle ?? this.detailTitle
      ..promotionPerLimit = promotionPerLimit ?? this.promotionPerLimit
      ..promotionType = promotionType ?? this.promotionType
      ..brandName = brandName ?? this.brandName
      ..productCategoryName = productCategoryName ?? this.productCategoryName
      ..description = description ?? this.description
      ..promotionPrice = promotionPrice ?? this.promotionPrice
      ..promotionStartTime = promotionStartTime ?? this.promotionStartTime
      ..promotionEndTime = promotionEndTime ?? this.promotionEndTime;
  }
}

HomeContentNewProductList $HomeContentNewProductListFromJson(Map<String, dynamic> json) {
  final HomeContentNewProductList homeContentNewProductList = HomeContentNewProductList();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    homeContentNewProductList.id = id;
  }
  final int? brandId = jsonConvert.convert<int>(json['brandId']);
  if (brandId != null) {
    homeContentNewProductList.brandId = brandId;
  }
  final int? productCategoryId = jsonConvert.convert<int>(json['productCategoryId']);
  if (productCategoryId != null) {
    homeContentNewProductList.productCategoryId = productCategoryId;
  }
  final int? feightTemplateId = jsonConvert.convert<int>(json['feightTemplateId']);
  if (feightTemplateId != null) {
    homeContentNewProductList.feightTemplateId = feightTemplateId;
  }
  final int? productAttributeCategoryId = jsonConvert.convert<int>(
      json['productAttributeCategoryId']);
  if (productAttributeCategoryId != null) {
    homeContentNewProductList.productAttributeCategoryId = productAttributeCategoryId;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    homeContentNewProductList.name = name;
  }
  final String? pic = jsonConvert.convert<String>(json['pic']);
  if (pic != null) {
    homeContentNewProductList.pic = pic;
  }
  final String? productSn = jsonConvert.convert<String>(json['productSn']);
  if (productSn != null) {
    homeContentNewProductList.productSn = productSn;
  }
  final int? deleteStatus = jsonConvert.convert<int>(json['deleteStatus']);
  if (deleteStatus != null) {
    homeContentNewProductList.deleteStatus = deleteStatus;
  }
  final int? publishStatus = jsonConvert.convert<int>(json['publishStatus']);
  if (publishStatus != null) {
    homeContentNewProductList.publishStatus = publishStatus;
  }
  final int? newStatus = jsonConvert.convert<int>(json['newStatus']);
  if (newStatus != null) {
    homeContentNewProductList.newStatus = newStatus;
  }
  final int? recommandStatus = jsonConvert.convert<int>(json['recommandStatus']);
  if (recommandStatus != null) {
    homeContentNewProductList.recommandStatus = recommandStatus;
  }
  final int? verifyStatus = jsonConvert.convert<int>(json['verifyStatus']);
  if (verifyStatus != null) {
    homeContentNewProductList.verifyStatus = verifyStatus;
  }
  final int? sort = jsonConvert.convert<int>(json['sort']);
  if (sort != null) {
    homeContentNewProductList.sort = sort;
  }
  final int? sale = jsonConvert.convert<int>(json['sale']);
  if (sale != null) {
    homeContentNewProductList.sale = sale;
  }
  final double? price = jsonConvert.convert<double>(json['price']);
  if (price != null) {
    homeContentNewProductList.price = price;
  }
  final int? giftGrowth = jsonConvert.convert<int>(json['giftGrowth']);
  if (giftGrowth != null) {
    homeContentNewProductList.giftGrowth = giftGrowth;
  }
  final int? giftPoint = jsonConvert.convert<int>(json['giftPoint']);
  if (giftPoint != null) {
    homeContentNewProductList.giftPoint = giftPoint;
  }
  final int? usePointLimit = jsonConvert.convert<int>(json['usePointLimit']);
  if (usePointLimit != null) {
    homeContentNewProductList.usePointLimit = usePointLimit;
  }
  final String? subTitle = jsonConvert.convert<String>(json['subTitle']);
  if (subTitle != null) {
    homeContentNewProductList.subTitle = subTitle;
  }
  final double? originalPrice = jsonConvert.convert<double>(json['originalPrice']);
  if (originalPrice != null) {
    homeContentNewProductList.originalPrice = originalPrice;
  }
  final int? stock = jsonConvert.convert<int>(json['stock']);
  if (stock != null) {
    homeContentNewProductList.stock = stock;
  }
  final int? lowStock = jsonConvert.convert<int>(json['lowStock']);
  if (lowStock != null) {
    homeContentNewProductList.lowStock = lowStock;
  }
  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    homeContentNewProductList.unit = unit;
  }
  final double? weight = jsonConvert.convert<double>(json['weight']);
  if (weight != null) {
    homeContentNewProductList.weight = weight;
  }
  final int? previewStatus = jsonConvert.convert<int>(json['previewStatus']);
  if (previewStatus != null) {
    homeContentNewProductList.previewStatus = previewStatus;
  }
  final String? serviceIds = jsonConvert.convert<String>(json['serviceIds']);
  if (serviceIds != null) {
    homeContentNewProductList.serviceIds = serviceIds;
  }
  final String? keywords = jsonConvert.convert<String>(json['keywords']);
  if (keywords != null) {
    homeContentNewProductList.keywords = keywords;
  }
  final String? note = jsonConvert.convert<String>(json['note']);
  if (note != null) {
    homeContentNewProductList.note = note;
  }
  final String? albumPics = jsonConvert.convert<String>(json['albumPics']);
  if (albumPics != null) {
    homeContentNewProductList.albumPics = albumPics;
  }
  final String? detailTitle = jsonConvert.convert<String>(json['detailTitle']);
  if (detailTitle != null) {
    homeContentNewProductList.detailTitle = detailTitle;
  }
  final int? promotionPerLimit = jsonConvert.convert<int>(json['promotionPerLimit']);
  if (promotionPerLimit != null) {
    homeContentNewProductList.promotionPerLimit = promotionPerLimit;
  }
  final int? promotionType = jsonConvert.convert<int>(json['promotionType']);
  if (promotionType != null) {
    homeContentNewProductList.promotionType = promotionType;
  }
  final String? brandName = jsonConvert.convert<String>(json['brandName']);
  if (brandName != null) {
    homeContentNewProductList.brandName = brandName;
  }
  final String? productCategoryName = jsonConvert.convert<String>(json['productCategoryName']);
  if (productCategoryName != null) {
    homeContentNewProductList.productCategoryName = productCategoryName;
  }
  final String? description = jsonConvert.convert<String>(json['description']);
  if (description != null) {
    homeContentNewProductList.description = description;
  }
  return homeContentNewProductList;
}

Map<String, dynamic> $HomeContentNewProductListToJson(HomeContentNewProductList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['brandId'] = entity.brandId;
  data['productCategoryId'] = entity.productCategoryId;
  data['feightTemplateId'] = entity.feightTemplateId;
  data['productAttributeCategoryId'] = entity.productAttributeCategoryId;
  data['name'] = entity.name;
  data['pic'] = entity.pic;
  data['productSn'] = entity.productSn;
  data['deleteStatus'] = entity.deleteStatus;
  data['publishStatus'] = entity.publishStatus;
  data['newStatus'] = entity.newStatus;
  data['recommandStatus'] = entity.recommandStatus;
  data['verifyStatus'] = entity.verifyStatus;
  data['sort'] = entity.sort;
  data['sale'] = entity.sale;
  data['price'] = entity.price;
  data['giftGrowth'] = entity.giftGrowth;
  data['giftPoint'] = entity.giftPoint;
  data['usePointLimit'] = entity.usePointLimit;
  data['subTitle'] = entity.subTitle;
  data['originalPrice'] = entity.originalPrice;
  data['stock'] = entity.stock;
  data['lowStock'] = entity.lowStock;
  data['unit'] = entity.unit;
  data['weight'] = entity.weight;
  data['previewStatus'] = entity.previewStatus;
  data['serviceIds'] = entity.serviceIds;
  data['keywords'] = entity.keywords;
  data['note'] = entity.note;
  data['albumPics'] = entity.albumPics;
  data['detailTitle'] = entity.detailTitle;
  data['promotionPerLimit'] = entity.promotionPerLimit;
  data['promotionType'] = entity.promotionType;
  data['brandName'] = entity.brandName;
  data['productCategoryName'] = entity.productCategoryName;
  data['description'] = entity.description;
  return data;
}

extension HomeContentNewProductListExtension on HomeContentNewProductList {
  HomeContentNewProductList copyWith({
    int? id,
    int? brandId,
    int? productCategoryId,
    int? feightTemplateId,
    int? productAttributeCategoryId,
    String? name,
    String? pic,
    String? productSn,
    int? deleteStatus,
    int? publishStatus,
    int? newStatus,
    int? recommandStatus,
    int? verifyStatus,
    int? sort,
    int? sale,
    double? price,
    int? giftGrowth,
    int? giftPoint,
    int? usePointLimit,
    String? subTitle,
    double? originalPrice,
    int? stock,
    int? lowStock,
    String? unit,
    double? weight,
    int? previewStatus,
    String? serviceIds,
    String? keywords,
    String? note,
    String? albumPics,
    String? detailTitle,
    int? promotionPerLimit,
    int? promotionType,
    String? brandName,
    String? productCategoryName,
    String? description,
  }) {
    return HomeContentNewProductList()
      ..id = id ?? this.id
      ..brandId = brandId ?? this.brandId
      ..productCategoryId = productCategoryId ?? this.productCategoryId
      ..feightTemplateId = feightTemplateId ?? this.feightTemplateId
      ..productAttributeCategoryId = productAttributeCategoryId ?? this.productAttributeCategoryId
      ..name = name ?? this.name
      ..pic = pic ?? this.pic
      ..productSn = productSn ?? this.productSn
      ..deleteStatus = deleteStatus ?? this.deleteStatus
      ..publishStatus = publishStatus ?? this.publishStatus
      ..newStatus = newStatus ?? this.newStatus
      ..recommandStatus = recommandStatus ?? this.recommandStatus
      ..verifyStatus = verifyStatus ?? this.verifyStatus
      ..sort = sort ?? this.sort
      ..sale = sale ?? this.sale
      ..price = price ?? this.price
      ..giftGrowth = giftGrowth ?? this.giftGrowth
      ..giftPoint = giftPoint ?? this.giftPoint
      ..usePointLimit = usePointLimit ?? this.usePointLimit
      ..subTitle = subTitle ?? this.subTitle
      ..originalPrice = originalPrice ?? this.originalPrice
      ..stock = stock ?? this.stock
      ..lowStock = lowStock ?? this.lowStock
      ..unit = unit ?? this.unit
      ..weight = weight ?? this.weight
      ..previewStatus = previewStatus ?? this.previewStatus
      ..serviceIds = serviceIds ?? this.serviceIds
      ..keywords = keywords ?? this.keywords
      ..note = note ?? this.note
      ..albumPics = albumPics ?? this.albumPics
      ..detailTitle = detailTitle ?? this.detailTitle
      ..promotionPerLimit = promotionPerLimit ?? this.promotionPerLimit
      ..promotionType = promotionType ?? this.promotionType
      ..brandName = brandName ?? this.brandName
      ..productCategoryName = productCategoryName ?? this.productCategoryName
      ..description = description ?? this.description;
  }
}

HomeContentHotProductList $HomeContentHotProductListFromJson(Map<String, dynamic> json) {
  final HomeContentHotProductList homeContentHotProductList = HomeContentHotProductList();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    homeContentHotProductList.id = id;
  }
  final int? brandId = jsonConvert.convert<int>(json['brandId']);
  if (brandId != null) {
    homeContentHotProductList.brandId = brandId;
  }
  final int? productCategoryId = jsonConvert.convert<int>(json['productCategoryId']);
  if (productCategoryId != null) {
    homeContentHotProductList.productCategoryId = productCategoryId;
  }
  final int? feightTemplateId = jsonConvert.convert<int>(json['feightTemplateId']);
  if (feightTemplateId != null) {
    homeContentHotProductList.feightTemplateId = feightTemplateId;
  }
  final int? productAttributeCategoryId = jsonConvert.convert<int>(
      json['productAttributeCategoryId']);
  if (productAttributeCategoryId != null) {
    homeContentHotProductList.productAttributeCategoryId = productAttributeCategoryId;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    homeContentHotProductList.name = name;
  }
  final String? pic = jsonConvert.convert<String>(json['pic']);
  if (pic != null) {
    homeContentHotProductList.pic = pic;
  }
  final String? productSn = jsonConvert.convert<String>(json['productSn']);
  if (productSn != null) {
    homeContentHotProductList.productSn = productSn;
  }
  final int? deleteStatus = jsonConvert.convert<int>(json['deleteStatus']);
  if (deleteStatus != null) {
    homeContentHotProductList.deleteStatus = deleteStatus;
  }
  final int? publishStatus = jsonConvert.convert<int>(json['publishStatus']);
  if (publishStatus != null) {
    homeContentHotProductList.publishStatus = publishStatus;
  }
  final int? newStatus = jsonConvert.convert<int>(json['newStatus']);
  if (newStatus != null) {
    homeContentHotProductList.newStatus = newStatus;
  }
  final int? recommandStatus = jsonConvert.convert<int>(json['recommandStatus']);
  if (recommandStatus != null) {
    homeContentHotProductList.recommandStatus = recommandStatus;
  }
  final int? verifyStatus = jsonConvert.convert<int>(json['verifyStatus']);
  if (verifyStatus != null) {
    homeContentHotProductList.verifyStatus = verifyStatus;
  }
  final int? sort = jsonConvert.convert<int>(json['sort']);
  if (sort != null) {
    homeContentHotProductList.sort = sort;
  }
  final int? sale = jsonConvert.convert<int>(json['sale']);
  if (sale != null) {
    homeContentHotProductList.sale = sale;
  }
  final double? price = jsonConvert.convert<double>(json['price']);
  if (price != null) {
    homeContentHotProductList.price = price;
  }
  final int? giftGrowth = jsonConvert.convert<int>(json['giftGrowth']);
  if (giftGrowth != null) {
    homeContentHotProductList.giftGrowth = giftGrowth;
  }
  final int? giftPoint = jsonConvert.convert<int>(json['giftPoint']);
  if (giftPoint != null) {
    homeContentHotProductList.giftPoint = giftPoint;
  }
  final int? usePointLimit = jsonConvert.convert<int>(json['usePointLimit']);
  if (usePointLimit != null) {
    homeContentHotProductList.usePointLimit = usePointLimit;
  }
  final String? subTitle = jsonConvert.convert<String>(json['subTitle']);
  if (subTitle != null) {
    homeContentHotProductList.subTitle = subTitle;
  }
  final double? originalPrice = jsonConvert.convert<double>(json['originalPrice']);
  if (originalPrice != null) {
    homeContentHotProductList.originalPrice = originalPrice;
  }
  final int? stock = jsonConvert.convert<int>(json['stock']);
  if (stock != null) {
    homeContentHotProductList.stock = stock;
  }
  final int? lowStock = jsonConvert.convert<int>(json['lowStock']);
  if (lowStock != null) {
    homeContentHotProductList.lowStock = lowStock;
  }
  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    homeContentHotProductList.unit = unit;
  }
  final double? weight = jsonConvert.convert<double>(json['weight']);
  if (weight != null) {
    homeContentHotProductList.weight = weight;
  }
  final int? previewStatus = jsonConvert.convert<int>(json['previewStatus']);
  if (previewStatus != null) {
    homeContentHotProductList.previewStatus = previewStatus;
  }
  final String? serviceIds = jsonConvert.convert<String>(json['serviceIds']);
  if (serviceIds != null) {
    homeContentHotProductList.serviceIds = serviceIds;
  }
  final String? keywords = jsonConvert.convert<String>(json['keywords']);
  if (keywords != null) {
    homeContentHotProductList.keywords = keywords;
  }
  final String? note = jsonConvert.convert<String>(json['note']);
  if (note != null) {
    homeContentHotProductList.note = note;
  }
  final String? albumPics = jsonConvert.convert<String>(json['albumPics']);
  if (albumPics != null) {
    homeContentHotProductList.albumPics = albumPics;
  }
  final String? detailTitle = jsonConvert.convert<String>(json['detailTitle']);
  if (detailTitle != null) {
    homeContentHotProductList.detailTitle = detailTitle;
  }
  final int? promotionPerLimit = jsonConvert.convert<int>(json['promotionPerLimit']);
  if (promotionPerLimit != null) {
    homeContentHotProductList.promotionPerLimit = promotionPerLimit;
  }
  final int? promotionType = jsonConvert.convert<int>(json['promotionType']);
  if (promotionType != null) {
    homeContentHotProductList.promotionType = promotionType;
  }
  final String? brandName = jsonConvert.convert<String>(json['brandName']);
  if (brandName != null) {
    homeContentHotProductList.brandName = brandName;
  }
  final String? productCategoryName = jsonConvert.convert<String>(json['productCategoryName']);
  if (productCategoryName != null) {
    homeContentHotProductList.productCategoryName = productCategoryName;
  }
  final String? description = jsonConvert.convert<String>(json['description']);
  if (description != null) {
    homeContentHotProductList.description = description;
  }
  return homeContentHotProductList;
}

Map<String, dynamic> $HomeContentHotProductListToJson(HomeContentHotProductList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['brandId'] = entity.brandId;
  data['productCategoryId'] = entity.productCategoryId;
  data['feightTemplateId'] = entity.feightTemplateId;
  data['productAttributeCategoryId'] = entity.productAttributeCategoryId;
  data['name'] = entity.name;
  data['pic'] = entity.pic;
  data['productSn'] = entity.productSn;
  data['deleteStatus'] = entity.deleteStatus;
  data['publishStatus'] = entity.publishStatus;
  data['newStatus'] = entity.newStatus;
  data['recommandStatus'] = entity.recommandStatus;
  data['verifyStatus'] = entity.verifyStatus;
  data['sort'] = entity.sort;
  data['sale'] = entity.sale;
  data['price'] = entity.price;
  data['giftGrowth'] = entity.giftGrowth;
  data['giftPoint'] = entity.giftPoint;
  data['usePointLimit'] = entity.usePointLimit;
  data['subTitle'] = entity.subTitle;
  data['originalPrice'] = entity.originalPrice;
  data['stock'] = entity.stock;
  data['lowStock'] = entity.lowStock;
  data['unit'] = entity.unit;
  data['weight'] = entity.weight;
  data['previewStatus'] = entity.previewStatus;
  data['serviceIds'] = entity.serviceIds;
  data['keywords'] = entity.keywords;
  data['note'] = entity.note;
  data['albumPics'] = entity.albumPics;
  data['detailTitle'] = entity.detailTitle;
  data['promotionPerLimit'] = entity.promotionPerLimit;
  data['promotionType'] = entity.promotionType;
  data['brandName'] = entity.brandName;
  data['productCategoryName'] = entity.productCategoryName;
  data['description'] = entity.description;
  return data;
}

extension HomeContentHotProductListExtension on HomeContentHotProductList {
  HomeContentHotProductList copyWith({
    int? id,
    int? brandId,
    int? productCategoryId,
    int? feightTemplateId,
    int? productAttributeCategoryId,
    String? name,
    String? pic,
    String? productSn,
    int? deleteStatus,
    int? publishStatus,
    int? newStatus,
    int? recommandStatus,
    int? verifyStatus,
    int? sort,
    int? sale,
    double? price,
    int? giftGrowth,
    int? giftPoint,
    int? usePointLimit,
    String? subTitle,
    double? originalPrice,
    int? stock,
    int? lowStock,
    String? unit,
    double? weight,
    int? previewStatus,
    String? serviceIds,
    String? keywords,
    String? note,
    String? albumPics,
    String? detailTitle,
    int? promotionPerLimit,
    int? promotionType,
    String? brandName,
    String? productCategoryName,
    String? description,
  }) {
    return HomeContentHotProductList()
      ..id = id ?? this.id
      ..brandId = brandId ?? this.brandId
      ..productCategoryId = productCategoryId ?? this.productCategoryId
      ..feightTemplateId = feightTemplateId ?? this.feightTemplateId
      ..productAttributeCategoryId = productAttributeCategoryId ?? this.productAttributeCategoryId
      ..name = name ?? this.name
      ..pic = pic ?? this.pic
      ..productSn = productSn ?? this.productSn
      ..deleteStatus = deleteStatus ?? this.deleteStatus
      ..publishStatus = publishStatus ?? this.publishStatus
      ..newStatus = newStatus ?? this.newStatus
      ..recommandStatus = recommandStatus ?? this.recommandStatus
      ..verifyStatus = verifyStatus ?? this.verifyStatus
      ..sort = sort ?? this.sort
      ..sale = sale ?? this.sale
      ..price = price ?? this.price
      ..giftGrowth = giftGrowth ?? this.giftGrowth
      ..giftPoint = giftPoint ?? this.giftPoint
      ..usePointLimit = usePointLimit ?? this.usePointLimit
      ..subTitle = subTitle ?? this.subTitle
      ..originalPrice = originalPrice ?? this.originalPrice
      ..stock = stock ?? this.stock
      ..lowStock = lowStock ?? this.lowStock
      ..unit = unit ?? this.unit
      ..weight = weight ?? this.weight
      ..previewStatus = previewStatus ?? this.previewStatus
      ..serviceIds = serviceIds ?? this.serviceIds
      ..keywords = keywords ?? this.keywords
      ..note = note ?? this.note
      ..albumPics = albumPics ?? this.albumPics
      ..detailTitle = detailTitle ?? this.detailTitle
      ..promotionPerLimit = promotionPerLimit ?? this.promotionPerLimit
      ..promotionType = promotionType ?? this.promotionType
      ..brandName = brandName ?? this.brandName
      ..productCategoryName = productCategoryName ?? this.productCategoryName
      ..description = description ?? this.description;
  }
}